function [tstop] = sunset(dn, latt)
% sunset
% Tells us that the dday is done
% INPUTS
    % dn = day number
    % phi= lattitude
% OUTPUTS
    % tstop = time to stop (in solar time)

%%Computes the sunset time 
        
delta = (asind((sind(23.45) * sind((360/365)*(dn-81)))));
ws = acosd(-tand(delta)*tand(latt));
tstop = ws/15 + 12;

